-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use netboot.AllowPXE to determine hardware ready status #367
Conversation
d49f40b
to
b630e0d
Compare
// setting these Metadata.State and Metadata.Instance.State = "" indicates to Boots | ||
// that this hardware should be allowed to netboot. FYI, this is not authoritative. | ||
// setting the AllowPXE=true indicates to Smee that this hardware should be allowed | ||
// to netboot. FYI, this is not authoritative. | ||
// Other hardware values can be set to prohibit netbooting of a machine. | ||
// See this Boots function for the logic around this: https://github.com/tinkerbell/boots/blob/main/job/dhcp.go#L115 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update the link as well? Thanks.
for _, ifc := range hw.Spec.Interfaces { | ||
if ifc.Netboot != nil { | ||
ifc.Netboot.AllowPXE = ptr.To(false) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the caller should be setting this.
patchHardwareStates
has no business logic that describes the conditions for assigning false so its peculiar to have it live here. We also previously made the decision in the calling function and I think that's the right level to have the logic because it has sufficient context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some rejigging. See inline comments.
Signed-off-by: Ahree Hong <[email protected]>
Description
This PR changes CAPT to look at
hardware.Spec.Interfaces[].netboot.AllowPXE
to determine if the hardware is ready and gate network bootingWhy is this needed
Gating of network booting in Smee now occurs via
Hardware.Spec.Interfaces[].Netboot.AllowPXE
, so we need to update the logic in CAPTFixes: #363
How Has This Been Tested?
Tested manually following these steps:
and verified that the machine does not go into network boot after the reboot
Checklist:
I have: